package service

import (
	"github.com/gin-gonic/gin"
	"github.com/astaxie/beego/orm"
	"talentsystem/model"
)

func Test(c *gin.Context){
	var param model.TypeId
	if err:=c.Bind(&param);err!=nil{
		c.JSON(500,gin.H{
			"status":500,
			"msg":"参数格式不正确",
		})
		return
	}
	var result model.PerfectYourResume
	orm.NewOrm().Raw("select resume.*,resume_ability.*,resume_education.*,resume_experence.*,resume_hope.* from resume_ability,resume,resume_education,resume_experence,resume_hope where resume.account_id=? and resume_ability.resume_id=resume.id and resume_education.resume_id=resume.id and resume_experence.resume_id=resume.id and resume_hope.resume_id=resume.id",param.Id).QueryRow(&result)
	c.JSON(200, gin.H{
		"status": 200,
		"data":  result,
	})
}